home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / PROBLEMS < prev    next >
Encoding:
Text File  |  1995-08-30  |  41.7 KB  |  998 lines

  1. This file describes various problems that have been encountered
  2. in compiling, installing and running GNU Emacs.
  3.  
  4. * Don't use the native cc on SCO OpenServer 5.  Here is what Robert
  5.   Lipe <robertl@arnet.com> says:
  6.  
  7. Building with the native cc on SCO OpenServer 5 produces a
  8. disfunctional binary.  This is under investigation, but is unlikely to
  9. be resolved before 19.13 ships.  icc [ supplied with the OpenServer 5
  10. Development System ] generates a working binary, but you must override
  11. the defaults while compiling font-lock.o and extents.o.  
  12.  
  13. The way I handle the build procedure is:
  14.  
  15. configure ../*14/configure --with-gcc=no --compiler="icc"
  16. make -k    
  17. [ procure pizza, beer ] 
  18. cd src
  19. make CC="icc -W0,-mP1COPT_max_tree_size=3000" font-lock.o extents.o
  20. make LD=icc
  21.  
  22.  
  23. * Don't use -O2 with gcc under Linux without also using
  24.   -fno-strength-reduce.  gcc will generate incorrect code otherwise.
  25.   This bug is present in at least 2.6.x and 2.7.x.
  26.  
  27. * Under some versions of OSF XEmacs runs fine if built without
  28. optimization but will crash randomly if built with optimization.
  29. Using 'cc -g' is not sufficient to eliminate all optimization.  Try
  30. 'cc -g -O0' instead.
  31.  
  32. * On HP/UX configure selects gcc even though it isn't actually present.
  33.  
  34. Some versions of SoftBench have an executable called 'gcc' that is not
  35. actually the GNU C compiler.  Use the --with-gcc=no flag when running
  36. configure.
  37.  
  38. * Solaris 2.3 /bin/sh coredumps during configuration.
  39.  
  40. This only occurs if you have LANG != C.  This is a known bug with
  41. /bin/sh fixed by installing Patch-ID# 101613-01.
  42.  
  43. * `Pid xxx killed due to text modification or page I/O error'
  44.  
  45. On HP/UX, you can get that error when the Emacs executable is on an NFS
  46. file system.  HP/UX responds this way if it tries to swap in a page and
  47. does not get a response from the server within a timeout whose default
  48. value is just ten seconds.
  49.  
  50. If this happens to you, extend the timeout period.
  51.  
  52. * `expand-file-name' fails to work on any but the machine you dumped Emacs on.
  53.  
  54. On Ultrix, if you use any of the functions which look up information
  55. in the passwd database before dumping Emacs (say, by using
  56. expand-file-name in site-init.el), then those functions will not work
  57. in the dumped Emacs on any host but the one Emacs was dumped on.
  58.  
  59. The solution?  Don't use expand-file-name in site-init.el, or in
  60. anything it loads.  Yuck - some solution.
  61.  
  62. I'm not sure why this happens; if you can find out exactly what is
  63. going on, and perhaps find a fix or a workaround, please let us know.
  64. Perhaps the YP functions cache some information, the cache is included
  65. in the dumped Emacs, and is then inaccurate on any other host.
  66.  
  67. * Emacs fails to understand most Internet host names, even though
  68. the names work properly with other programs on the same system.
  69.  
  70. This typically happens on Suns and other systems that use shared
  71. libraries.  The cause is that the site has installed a version of the
  72. shared library which uses a name server--but has not installed a
  73. similiar version of the unshared library which Emacs uses.
  74.  
  75. The result is that most programs, using the shared library, work with
  76. the nameserver, but Emacs does not.
  77.  
  78. The fix is to install an unshared library that corresponds to what you
  79. installed in the shared library, and then relink Emacs.
  80.  
  81. * On a Sun running SunOS 4.1.1, you get this error message from GNU ld:
  82.  
  83.     /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment 
  84.  
  85. The problem is in the Sun shared C library, not in GNU ld.
  86.  
  87. The solution is to install Patch-ID# 100267-03 from Sun.
  88.  
  89. * SunOS 4.1.2: undefined symbol _get_wmShellWidgetClass
  90.  
  91.   Apparently the version of libXmu.so.a that Sun ships is hosed: it's missing
  92.   some stuff that is in libXmu.a (the static version).  Sun has a patch for 
  93.   this, but a workaround is to use the static version of libXmu, by changing
  94.   the link command from "-lXmu" to "-Bstatic -lXmu -Bdynamic".  If you have
  95.   OpenWindows 3.0, ask Sun for these patches:
  96.     100512-02       4.1.x OpenWindows 3.0 libXt Jumbo patch
  97.     100573-03       4.1.x OpenWindows 3.0 undefined symbols with shared libXmu
  98.  
  99. * Random other SunOS 4.1.[12] link errors.
  100.  
  101.   The X headers and libraries that Sun ships in /usr/{include,lib}/X11 are
  102.   broken.  Use the ones in /usr/openwin/{include,lib} instead.
  103.  
  104. * Bus errors on startup when compiled with Sun's "acc" (in the routine
  105.   make_string_internal() called from initialize_environment_alist())
  106.  
  107.   The Sun ANSI compiler doesn't place uninitialized static variables in BSS
  108.   space like other compilers do.  This breaks emacs.  If you want to use acc,
  109.   you need to make the file "lastfile.o" be the *first* file in the link 
  110.   command.  Better yet, use Lucid C or GCC.
  111.  
  112. * The compiler generates lots and lots of syntax errors.
  113.  
  114. Are you using an ANSI C compiler, like lcc or gcc?  The SunOS 4.1 bundled cc
  115. is not ANSI.
  116.  
  117. If X has not been configured to compile itself using lcc, gcc, or another ANSI
  118. compiler, then you will have to hack the automatically-generated makefile in
  119. the `lwlib' directory by hand to make it use an ANSI compiler.
  120.  
  121. * When using gcc, you get the error message "undefined symbol __fixunsdfsi".
  122. * When using gcc, you get the error message "undefined symbol __main".
  123.  
  124. This means that you need to link with the gcc library.  It may be called
  125. "gcc-gnulib" or "libgcc.a"; figure out where it is, and define LIB_GCC in
  126. config.h to point to it.
  127.  
  128. It may also work to use the GCC version of `ld' instead of the standard one.
  129.  
  130. * When compiling with X11, you get "undefined symbol _XtStrings".
  131.  
  132. This means that you are trying to link emacs against the X11r4 version of
  133. libXt.a, but you have compiled either Emacs or the code in the lwlib
  134. subdirectory with the X11r5 header files.  That doesn't work.
  135.  
  136. Remember, you can't compile lwlib for r4 and emacs for r5, or vice versa.
  137. They must be in sync.
  138.  
  139. * Self documentation messages are garbled.
  140.  
  141. This means that the file `etc/DOC-...' doesn't properly correspond
  142. with the Emacs executable.  Redumping Emacs and then installing the
  143. corresponding pair of files should fix the problem.
  144.  
  145. * M-x shell immediately responds "Process shell exited abnormally with code 1".
  146.  
  147. This is often due to inability to run the program `env'.
  148. This should be in the `etc' subdirectory of the directory
  149. where Emacs is installed, and it should be marked executable.
  150.  
  151. * Trouble using ptys on AIX.
  152.  
  153. People often instll the pty devices on AIX incorrectly.
  154. Use `smit pty' to reinstall them properly.
  155.  
  156. * Shell mode on HP/UX gives the message, "`tty`: Ambiguous".
  157.  
  158. christos@theory.tn.cornell.edu says:
  159.  
  160. The problem is that in your .cshrc you have something that tries to
  161. execute `tty`. If you are not running the shell on a real tty then 
  162. tty will print "not a tty". Csh expects one word in some places, 
  163. but tty is giving it back 3.
  164.  
  165. The solution is to add a pair of quotes around `tty` to make it a single
  166. word: 
  167.  
  168. if (`tty` == "/dev/console") 
  169.  
  170. should be changed to:
  171.  
  172. if ("`tty`" == "/dev/console") 
  173.  
  174. Even better, move things that set up terminal sections out of .cshrc
  175. and into .login.
  176.  
  177. * With process-connection-type set to t, each line of subprocess output is
  178.   terminated with a ^M, making ange-ftp and GNUS not work.
  179.  
  180. On SunOS systems, this problem has been seen to be a result of an incomplete
  181. installation of gcc 2.2 which allowed some non-ANSI compatible include files
  182. into the compilation.  In particular this affected virtually all ioctl() calls.
  183.  
  184. * Once you pull down a menu from the menubar, it won't go away.
  185.  
  186. It has been claimed that this is caused by a bug in certain very old (1990?)
  187. versions of the twm window manager.  It doesn't happen with recent vintages,
  188. or with other window managers.
  189.  
  190. * Emacs ignores the "help" key when running OLWM.
  191.  
  192. OLWM grabs the help key, and retransmits it to the appropriate client using
  193. XSendEvent.  Allowing emacs to react to synthetic events is a security hole,
  194. so this is turned off by default.  You can enable it by setting the variable
  195. x-allow-sendevents to t.  You can also cause fix this by telling OLWM to not
  196. grab the help key, with the null binding "OpenWindows.KeyboardCommand.Help:".
  197.  
  198. * Something awful happens when I type M-ESC, instead of `eval-expression'.
  199.  
  200. MWM intercepts this and several other keys.  Turn this off by adding this to
  201. your resources: "mwm*keyBindings: NoKeyBindings".
  202.  
  203. * Emacs starts in a directory other than the one that is current in the shell.
  204.  
  205. If the PWD environment variable exists, Emacs uses this variable as
  206. the initial working directory.
  207.  
  208. Some shells automatically update this variable, while other shells fail
  209. to do so.  If you use two such shells in combination, the variable can
  210. end up wrong.  This confuses Emacs.
  211.  
  212. The solution is to put something in the start-up file for the shell
  213. that does not update PWD, to get rid of that environment variable.
  214. For example, in csh, use `unsetenv PWD'.
  215.  
  216. * Emacs gets error message from linker on Sun.
  217.  
  218. If the error message says that a symbol such as `f68881_used' or
  219. `ffpa_used' or `start_float' is undefined, this probably indicates
  220. that you have compiled some libraries, such as the X libraries, 
  221. with a floating point option other than the default.
  222.  
  223. It's not terribly hard to make this work with small changes in
  224. crt0.c together with linking with Fcrt1.o, Wcrt1.o or Mcrt1.o.
  225. However, the easiest approach is to build Xlib with the default
  226. floating point option: -fsoft to decide at run time what hardware 
  227. is available.
  228.  
  229. * Keyboard input gets confused after a beep when using a DECserver
  230.   as a concentrator.
  231.  
  232. This problem seems to be a matter of configuring the DECserver to use
  233. 7 bit characters rather than 8 bit characters.
  234.  
  235. * M-x shell persistently reports "Process shell exited abnormally with code 1".
  236.  
  237. This happened on Suns as a result of what is said to be a bug in Sunos
  238. version 4.0.x.  The only fix was to reboot the machine. 
  239.  
  240. * Programs running under terminal emulator do not recognize `emacs'
  241.   terminal type.
  242.  
  243. The cause of this is a shell startup file that sets the TERMCAP
  244. environment variable.  The terminal emulator uses that variable to
  245. provide the information on the special terminal type that Emacs
  246. emulates.
  247.  
  248. Rewrite your shell startup file so that it does not change TERMCAP
  249. in such a case.  You could use the following conditional which sets
  250. it only if it is undefined.
  251.  
  252.     if ( ! ${?TERMCAP} ) setenv TERMCAP ~/my-termcap-file
  253.  
  254. Or you could set TERMCAP only when you set TERM--which should not
  255. happen in a non-login shell.
  256.  
  257. * Error compiling sysdep.c, "sioctl.h: no such file or directory".
  258.  
  259. Among USG systems with TIOCGWINSZ, some require sysdep.c to include
  260. the file sioctl.h; on others, sioctl.h does not exist.  We don't know
  261. how to distinguish these two kind of systems, so currently we try to
  262. include sioctl.h on all of them.  If this #include gets an error, just
  263. delete it.
  264.  
  265. * Problem with remote X server on Suns.
  266.  
  267. On a Sun, running Emacs on one machine with the X server on another
  268. may not work if you have used the unshared system libraries.  This
  269. is because the unshared libraries fail to use YP for host name lookup.
  270. As a result, the host name you specify may not be recognized.
  271.  
  272. * Watch out for .emacs files and EMACSLOADPATH environment vars
  273.  
  274. These control the actions of Emacs.
  275. ~/.emacs is your Emacs init file.
  276. EMACSLOADPATH overrides which directories the function
  277. "load" will search.
  278.  
  279. If you observe strange problems, check for these and get rid
  280. of them, then try again.
  281.  
  282. * Shell mode ignores interrupts on Apollo Domain
  283.  
  284. You may find that M-x shell prints the following message:
  285.  
  286.    Warning: no access to tty; thus no job control in this shell...
  287.  
  288. This can happen if there are not enough ptys on your system.
  289. Here is how to make more of them.
  290.  
  291.     % cd /dev
  292.     % ls pty*
  293.     # shows how many pty's you have. I had 8, named pty0 to pty7)
  294.     % /etc/crpty 8
  295.     # creates eight new pty's
  296.  
  297. * Fatal signal in the command  temacs -l loadup inc dump
  298.  
  299. This command is the final stage of building Emacs.  It is run by the
  300. Makefile in the src subdirectory, or by build.com on VMS.
  301.  
  302. It has been known to get fatal errors due to insufficient swapping
  303. space available on the machine.
  304.  
  305. On 68000's, it has also happened because of bugs in the
  306. subroutine `alloca'.  Verify that `alloca' works right, even
  307. for large blocks (many pages).
  308.  
  309. * test-distrib says that the distribution has been clobbered
  310. * or, temacs prints "Command key out of range 0-127"
  311. * or, temacs runs and dumps xemacs, but xemacs totally fails to work.
  312. * or, temacs gets errors dumping xemacs
  313.  
  314. This can be because the .elc files have been garbled.  Do not be
  315. fooled by the fact that most of a .elc file is text: these are
  316. binary files and can contain all 256 byte values.
  317.  
  318. In particular `shar' cannot be used for transmitting GNU Emacs.
  319. It typically truncates "lines".  What appear to be "lines" in
  320. a binary file can of course be of any length.  Even once `shar'
  321. itself is made to work correctly, `sh' discards null characters
  322. when unpacking the shell archive.
  323.  
  324. I have also seen character \177 changed into \377.  I do not know
  325. what transfer means caused this problem.  Various network
  326. file transfer programs are suspected of clobbering the high bit.
  327.  
  328. If you have a copy of Emacs that has been damaged in its
  329. nonprinting characters, you can fix them:
  330.  
  331.  1) Record the names of all the .elc files.
  332.  2) Delete all the .elc files.
  333.  3) Recompile alloc.c with a value of PURESIZE twice as large.
  334.      You might as well save the old alloc.o.
  335.  4) Remake xemacs.  It should work now.
  336.  5) Running xemacs, do Meta-x byte-compile-file repeatedly
  337.   to recreate all the .elc files that used to exist.
  338.   You may need to increase the value of the variable
  339.   max-lisp-eval-depth to succeed in running the compiler interpreted
  340.   on certain .el files.  400 was sufficient as of last report.
  341.  6) Reinstall the old alloc.o (undoing changes to alloc.c if any)
  342.   and remake temacs.
  343.  7) Remake xemacs.  It should work now, with valid .elc files.
  344.  
  345. * temacs prints "Pure Lisp storage exhausted"
  346.  
  347. This means that the Lisp code loaded from the .elc and .el
  348. files during  temacs -l loadup inc dump  took up more
  349. space than was allocated.
  350.  
  351. This could be caused by
  352.  1) adding code to the preloaded Lisp files
  353.  2) adding more preloaded files in loadup.el
  354.  3) having a site-init.el or site-load.el which loads files.
  355.    Note that ANY site-init.el or site-load.el is nonstandard;
  356.    if you have received Emacs from some other site
  357.    and it contains a site-init.el or site-load.el file, consider
  358.    deleting that file.
  359.  4) getting the wrong .el or .elc files
  360.    (not from the directory you expected).
  361.  5) deleting some .elc files that are supposed to exist.
  362.    This would cause the source files (.el files) to be
  363.    loaded instead.  They take up more room, so you lose.
  364.  6) a bug in the Emacs distribution which underestimates
  365.    the space required.
  366.  
  367. If the need for more space is legitimate, change the definition
  368. of PURESIZE in puresize.h.
  369.  
  370. But in some of the cases listed above, this problem is a consequence
  371. of something else that is wrong.  Be sure to check and fix the real
  372. problem.
  373.  
  374. * Changes made to .el files do not take effect.
  375.  
  376. You may have forgotten to recompile them into .elc files.
  377. Then the old .elc files will be loaded, and your changes
  378. will not be seen.  To fix this, do M-x byte-recompile-directory
  379. and specify the directory that contains the Lisp files.
  380.  
  381. * Things which should be bold or italic (such as the initial copyright notice)
  382.   are not.
  383.  
  384. The fonts of the "bold" and "italic" faces are generated from the font of
  385. the "default" face; in this way, your bold and italic fonts will have the
  386. appropriate size and family.  However, emacs can only be clever in this
  387. way if you have specified the default font using the XLFD (X Logical Font
  388. Description) format, which looks like
  389.  
  390.     *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
  391.  
  392. if you use any of the other, less strict font name formats, some of which
  393. look like
  394.         lucidasanstypewriter-12
  395. and        fixed
  396. and        9x13
  397.  
  398. then emacs won't be able to guess the names of the "bold" and "italic"
  399. versions.  All X fonts can be referred to via XLFD-style names, so you
  400. should use those forms.  See the man pages for X(1), xlsfonts(1), and
  401. xfontsel(1).
  402.  
  403. * The dumped Emacs (xemacs) crashes when run, trying to write pure data.
  404.  
  405. Two causes have been seen for such problems.
  406.  
  407. 1) On a system where getpagesize is not a system call, it is defined
  408. as a macro.  If the definition (in both unexec.c and malloc.c) is wrong,
  409. it can cause problems like this.  You might be able to find the correct
  410. value in the man page for a.out (5).
  411.  
  412. 2) Some systems allocate variables declared static among the
  413. initialized variables.  Emacs makes all initialized variables in most
  414. of its files pure after dumping, but the variables declared static and
  415. not initialized are not supposed to be pure.  On these systems you
  416. may need to add "#define static" to the m- or the s- file.
  417.  
  418. * Reading and writing files is very very slow.
  419.  
  420. Try evaluating the form (setq lock-directory nil) and see if that helps.
  421. There is a problem with file-locking on some systems (possibly related
  422. to NFS) that I don't understand.  Please send mail to the address 
  423. xemacs@cs.uiuc.edu if you figure this one out.
  424.  
  425. * Compilation errors on VMS.
  426.  
  427. You will get warnings when compiling on VMS because there are
  428. variable names longer than 32 (or whatever it is) characters.
  429. This is not an error.  Ignore it.
  430.  
  431. VAX C does not support #if defined(foo).  Uses of this construct
  432. were removed, but some may have crept back in.  They must be rewritten.
  433.  
  434. There is a bug in the C compiler which fails to sign extend characters
  435. in conditional expressions.  The bug is:
  436.     char c = -1, d = 1;
  437.     int i;
  438.  
  439.     i = d ? c : d;
  440. The result is i == 255;  the fix is to typecast the char in the
  441. conditional expression as an (int).  Known occurrences of such
  442. constructs in Emacs have been fixed.
  443.  
  444. * "Symbol's value as variable is void: unread-command-char".
  445. * "Wrong type argument: arrayp, #<keymap 143 entries>"
  446. * "Wrong type argument: stringp, [#<keypress-event return>]"
  447.  
  448. There are a few incompatible changes in XEmacs, and these are the
  449. symptoms.  Some of the emacs-lisp code you are running needs to be
  450. updated to be compatible with XEmacs.
  451.  
  452. We have provided modified versions of several popular emacs packages (GNUS, 
  453. VM, etc) which are compatible with this version of emacs.  Check to make
  454. sure you have not set your load-path so that your private copies of these
  455. packages are being found before the versions in the lisp directory.
  456.  
  457. Make sure that your load-path and your $EMACSLOADPATH environment variable
  458. are not pointing at an Emacs18 lisp directory.  This will cripple emacs.
  459.  
  460. * rmail gets error getting new mail
  461.  
  462. rmail gets new mail from /usr/spool/mail/$USER using a program
  463. called `movemail'.  This program interlocks with /bin/mail using
  464. the protocol defined by /bin/mail.
  465.  
  466. There are two different protocols in general use.  One of them uses
  467. the `flock' system call.  The other involves creating a lock file;
  468. `movemail' must be able to write in /usr/spool/mail in order to do
  469. this.  You control which one is used by defining, or not defining,
  470. the macro MAIL_USE_FLOCK in config.h or the m- or s- file it includes.
  471. IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
  472. SYSTEM, YOU CAN LOSE MAIL!
  473.  
  474. If your system uses the lock file protocol, and fascist restrictions
  475. prevent ordinary users from writing the lock files in /usr/spool/mail,
  476. you may need to make `movemail' setgid to a suitable group such as
  477. `mail'.  You can use these commands (as root):
  478.  
  479.     chgrp mail movemail
  480.     chmod 2755 movemail
  481.  
  482. * Emacs won't work with X-windows if the value of DISPLAY is HOSTNAME:0.
  483. * GNUs can't make contact with the specified host for nntp.
  484.  
  485. Some people have found that Emacs was unable to connect to the local
  486. host by name, as in DISPLAY=prep:0 if you are running on prep, but
  487. could handle DISPLAY=unix:0.  Here is what tale@rpi.edu said:
  488.  
  489.     Seems as though gethostbyname was bombing somewhere along the way.
  490.     Well, we had just upgrade from SunOS 3.5 (which X11 was built under) to
  491.     SunOS 4.0.1.  Any new X applications which tried to be built with the
  492.     pre OS-upgrade libraries had the same problems which Emacs was having.
  493.     Missing /etc/resolv.conf for a little while (when one of the libraries
  494.     was built?) also might have had a hand in it.
  495.  
  496.     The result of all of this (with some speculation) was that we rebuilt
  497.     X and then rebuilt Emacs with the new libraries.  Works as it should
  498.     now.  Hoorah.
  499.  
  500. If you have already installed the name resolver in the file libresolv.a,
  501. then you need to compile Emacs to use that library.  The easiest way to
  502. do this is to add to config.h a definition of LIBS_SYSTEM, LIBS_MACHINE
  503. or LIB_STANDARD which uses -lresolv.  Watch out!  If you redefine a macro
  504. that is already in use in your configuration to supply some other libraries,
  505. be careful not to lose the others.
  506.  
  507. Thus, you could start by adding this to config.h:
  508.  
  509. #define LIBS_SYSTEM -lresolv
  510.  
  511. Then if this gives you an error for redefining a macro, and you see that
  512. the s- file defines LIBS_SYSTEM as -lfoo -lbar, you could change config.h
  513. again to say this:
  514.  
  515. #define LIBS_SYSTEM -lresolv -lfoo -lbar
  516.  
  517. The reason this is sometimes a problem for Emacs and not for other programs
  518. is that Emacs must be statically linked, while most other programs are
  519. dynamically linked.  Sometimes people install patches or updates into the
  520. dynamic version of a library without installing them into the static version
  521. as well, leading to these inconsistencies.
  522.  
  523. In particular, people often change the definition of `gethostbyname' in
  524. the dynamic version of libc.a to use a different method of host resolution,
  525. but forget to do the same to the static version of that library.
  526.  
  527. * Emacs spontaneously displays "I-search: " at the bottom of the screen.
  528.  
  529. This means that Control-S/Control-Q "flow control" is being used.
  530. C-s/C-q flow control is bad for Emacs editors because it takes away
  531. C-s and C-q as user commands.  Since editors do not output long streams
  532. of text without user commands, there is no need for a user-issuable
  533. "stop output" command in an editor; therefore, a properly designed
  534. flow control mechanism would transmit all possible input characters
  535. without interference.  Designing such a mechanism is easy, for a person
  536. with at least half a brain.
  537.  
  538. There are three possible reasons why flow control could be taking place:
  539.  
  540.   1) Terminal has not been told to disable flow control
  541.   2) Insufficient padding for the terminal in use
  542.   3) Some sort of terminal concentrator or line switch is responsible
  543.  
  544. First of all, many terminals have a set-up mode which controls
  545. whether they generate flow control characters.  This must be
  546. set to "no flow control" in order for Emacs to work.  Sometimes
  547. there is an escape sequence that the computer can send to turn
  548. flow control off and on.  If so, perhaps the termcap `ti' string
  549. should turn flow control off, and the `te' string should turn it on.
  550.  
  551. Once the terminal has been told "no flow control", you may find it
  552. needs more padding.  The amount of padding Emacs sends is controlled
  553. by the termcap entry for the terminal in use, and by the output baud
  554. rate as known by the kernel.  The shell command `stty' will print
  555. your output baud rate; `stty' with suitable arguments will set it if
  556. it is wrong.  Setting to a higher speed causes increased padding.  If
  557. the results are wrong for the correct speed, there is probably a
  558. problem in the termcap entry.  You must speak to a local Unix wizard
  559. to fix this.  Perhaps you are just using the wrong terminal type.
  560.  
  561. For terminals that lack a "no flow control" mode, sometimes just
  562. giving lots of padding will prevent actual generation of flow control
  563. codes.  You might as well try it.
  564.  
  565. If you are really unlucky, your terminal is connected to the computer
  566. through a concentrator which sends flow control to the computer, or it
  567. insists on sending flow control itself no matter how much padding you
  568. give it.  You are screwed!  You should replace the terminal or
  569. concentrator with a properly designed one.  In the mean time,
  570. some drastic measures can make Emacs semi-work.
  571.  
  572. One drastic measure to ignore C-s and C-q, while sending enough
  573. padding that the terminal will not really lose any output.
  574. Ignoring C-s and C-q can be done by using keyboard-translate-table
  575. to map them into an undefined character such as C-^ or C-\.  Sending
  576. lots of padding is done by changing the termcap entry.  Here is how
  577. to make such a keyboard-translate-table:
  578.  
  579.     (let ((the-table (make-string 128 0)))
  580.       ;; Default is to translate each character into itself.
  581.       (let ((i 0))
  582.     (while (< i 128)
  583.       (aset the-table i i)
  584.       (setq i (1+ i))))
  585.       ;; Swap C-s with C-\
  586.       (aset the-table ?\C-\\ ?\C-s)
  587.       (aset the-table ?\C-s ?\C-\\)
  588.       ;; Swap C-q with C-^
  589.       (aset the-table ?\C-^ ?\C-q)
  590.       (aset the-table ?\C-q ?\C-^)
  591.       (setq keyboard-translate-table the-table))
  592.  
  593. An even more drastic measure is to make Emacs use flow control.
  594. To do this, evaluate the Lisp expression (set-input-mode nil t).
  595. Emacs will then interpret C-s and C-q as flow control commands.  (More
  596. precisely, it will allow the kernel to do so as it usually does.)  You
  597. will lose the ability to use them for Emacs commands.  Also, as a
  598. consequence of using CBREAK mode, the terminal's Meta-key, if any,
  599. will not work, and C-g will be liable to cause a loss of output which
  600. will produce garbage on the screen.  (These problems apply to 4.2BSD;
  601. they may not happen in 4.3 or VMS, and I don't know what would happen
  602. in sysV.)  You can use keyboard-translate-table, as shown above,
  603. to map two other input characters (such as C-^ and C-\) into C-s and
  604. C-q, so that you can still search and quote.
  605.  
  606. I have no intention of ever redisigning the Emacs command set for
  607. the assumption that terminals use C-s/C-q flow control.  This
  608. flow control technique is a bad design, and terminals that need
  609. it are bad merchandise and should not be purchased.  If you can
  610. get some use out of GNU Emacs on inferior terminals, I am glad,
  611. but I will not make Emacs worse for properly designed systems
  612. for the sake of inferior systems.
  613.  
  614. * Control-S and Control-Q commands are ignored completely.
  615.  
  616. For some reason, your system is using brain-damaged C-s/C-q flow
  617. control despite Emacs's attempts to turn it off.  Perhaps your
  618. terminal is connected to the computer through a concentrator
  619. that wants to use flow control.
  620.  
  621. You should first try to tell the concentrator not to use flow control.
  622. If you succeed in this, try making the terminal work without
  623. flow control, as described in the preceding section.
  624.  
  625. If that line of approach is not successful, map some other characters
  626. into C-s and C-q using keyboard-translate-table.  The example above
  627. shows how to do this with C-^ and C-\.
  628.  
  629. * Control-S and Control-Q commands are ignored completely on a net connection.
  630.  
  631. Some versions of rlogin (and possibly telnet) do not pass flow
  632. control characters to the remote system to which they connect.
  633. On such systems, emacs on the remote system cannot disable flow
  634. control on the local system.
  635.  
  636. One way to cure this is to disable flow control on the local host
  637. (the one running rlogin, not the one running rlogind) using the
  638. stty command, before starting the rlogin process.  On many systems,
  639. "stty start u stop u" will do this.
  640.  
  641. Some versions of tcsh will prevent even this from working.  One way
  642. around this is to start another shell before starting rlogin, and
  643. issue the stty command to disable flow control from that shell.
  644.  
  645. * Screen is updated wrong, but only on one kind of terminal.
  646.  
  647. This could mean that the termcap entry you are using for that
  648. terminal is wrong, or it could mean that Emacs has a bug handing
  649. the combination of features specified for that terminal.
  650.  
  651. The first step in tracking this down is to record what characters
  652. Emacs is sending to the terminal.  Execute the Lisp expression
  653. (open-termscript "./emacs-script") to make Emacs write all
  654. terminal output into the file ~/emacs-script as well; then do
  655. what makes the screen update wrong, and look at the file
  656. and decode the characters using the manual for the terminal.
  657. There are several possibilities:
  658.  
  659. 1) The characters sent are correct, according to the terminal manual.
  660.  
  661. In this case, there is no obvious bug in Emacs, and most likely you
  662. need more padding, or possibly the terminal manual is wrong.
  663.  
  664. 2) The characters sent are incorrect, due to an obscure aspect
  665.  of the terminal behavior not described in an obvious way
  666.  by termcap.
  667.  
  668. This case is hard.  It will be necessary to think of a way for
  669. Emacs to distinguish between terminals with this kind of behavior
  670. and other terminals that behave subtly differently but are
  671. classified the same by termcap; or else find an algorithm for
  672. Emacs to use that avoids the difference.  Such changes must be
  673. tested on many kinds of terminals.
  674.  
  675. 3) The termcap entry is wrong.
  676.  
  677. See the file etc/TERMS for information on changes
  678. that are known to be needed in commonly used termcap entries
  679. for certain terminals.
  680.  
  681. 4) The characters sent are incorrect, and clearly cannot be
  682.  right for any terminal with the termcap entry you were using.
  683.  
  684. This is unambiguously an Emacs bug, and can probably be fixed
  685. in termcap.c, tparam.c, term.c, scroll.c, cm.c or dispnew.c.
  686.  
  687. * Output from Control-V is slow.
  688.  
  689. On many bit-map terminals, scrolling operations are fairly slow.
  690. Often the termcap entry for the type of terminal in use fails
  691. to inform Emacs of this.  The two lines at the bottom of the screen
  692. before a Control-V command are supposed to appear at the top after
  693. the Control-V command.  If Emacs thinks scrolling the lines is fast,
  694. it will scroll them to the top of the screen.
  695.  
  696. If scrolling is slow but Emacs thinks it is fast, the usual reason is
  697. that the termcap entry for the terminal you are using does not
  698. specify any padding time for the `al' and `dl' strings.  Emacs
  699. concludes that these operations take only as much time as it takes to
  700. send the commands at whatever line speed you are using.  You must
  701. fix the termcap entry to specify, for the `al' and `dl', as much
  702. time as the operations really take.
  703.  
  704. Currently Emacs thinks in terms of serial lines which send characters
  705. at a fixed rate, so that any operation which takes time for the
  706. terminal to execute must also be padded.  With bit-map terminals
  707. operated across networks, often the network provides some sort of
  708. flow control so that padding is never needed no matter how slow
  709. an operation is.  You must still specify a padding time if you want
  710. Emacs to realize that the operation takes a long time.  This will
  711. cause padding characters to be sent unnecessarily, but they do
  712. not really cost much.  They will be transmitted while the scrolling
  713. is happening and then discarded quickly by the terminal.
  714.  
  715. Most bit-map terminals provide commands for inserting or deleting
  716. multiple lines at once.  Define the `AL' and `DL' strings in the
  717. termcap entry to say how to do these things, and you will have
  718. fast output without wasted padding characters.  These strings should
  719. each contain a single %-spec saying how to send the number of lines
  720. to be scrolled.  These %-specs are like those in the termcap
  721. `cm' string.
  722.  
  723. You should also define the `IC' and `DC' strings if your terminal
  724. has a command to insert or delete multiple characters.  These
  725. take the number of positions to insert or delete as an argument.
  726.  
  727. A `cs' string to set the scrolling region will reduce the amount
  728. of motion you see on the screen when part of the screen is scrolled.
  729.  
  730. * Your Delete key sends a Backspace to the terminal, using an AIXterm.
  731.  
  732. The solution is to include in your .Xdefaults the lines:
  733.  
  734.    *aixterm.Translations: #override <Key>BackSpace: string(0x7f)
  735.    aixterm*ttyModes: erase ^?
  736.  
  737. This makes your Backspace key send DEL (ASCII 127).
  738.  
  739. * You type Control-H (Backspace) expecting to delete characters.
  740.  
  741. Put `stty dec' in your .login file and your problems will disappear
  742. after a day or two.
  743.  
  744. The choice of Backspace for erasure was based on confusion, caused by
  745. the fact that backspacing causes erasure (later, when you type another
  746. character) on most display terminals.  But it is a mistake.  Deletion
  747. of text is not the same thing as backspacing followed by failure to
  748. overprint.  I do not wish to propagate this confusion by conforming
  749. to it.
  750.  
  751. For this reason, I believe `stty dec' is the right mode to use,
  752. and I have designed Emacs to go with that.  If there were a thousand
  753. other control characters, I would define Control-h to delete as well;
  754. but there are not very many other control characters, and I think
  755. that providing the most mnemonic possible Help character is more
  756. important than adapting to people who don't use `stty dec'.
  757.  
  758. If you are obstinate about confusing buggy overprinting with deletion,
  759. you can redefine Backspace in your .emacs file:
  760.   (global-set-key "\b" 'delete-backward-char)
  761. You may then wish to put the function  help-command  on some
  762. other key.  I leave to you the task of deciding which key.
  763.  
  764. * Editing files through RFS gives spurious "file has changed" warnings.
  765. It is possible that a change in Emacs 18.37 gets around this problem,
  766. but in case not, here is a description of how to fix the RFS bug that
  767. causes it.
  768.  
  769.     There was a serious pair of bugs in the handling of the fsync() system
  770.     call in the RFS server.
  771.  
  772.     The first is that the fsync() call is handled as another name for the
  773.     close() system call (!!).  It appears that fsync() is not used by very
  774.     many programs; Emacs version 18 does an fsync() before closing files
  775.     to make sure that the bits are on the disk.
  776.  
  777.     This is fixed by the enclosed patch to the RFS server.
  778.  
  779.     The second, more serious problem, is that fsync() is treated as a
  780.     non-blocking system call (i.e., it's implemented as a message that
  781.     gets sent to the remote system without waiting for a reply).  Fsync is
  782.     a useful tool for building atomic file transactions.  Implementing it
  783.     as a non-blocking RPC call (when the local call blocks until the sync
  784.     is done) is a bad idea; unfortunately, changing it will break the RFS
  785.     protocol.  No fix was supplied for this problem.
  786.  
  787.     (as always, your line numbers may vary)
  788.  
  789.     % rcsdiff -c -r1.2 serversyscall.c
  790.     RCS file: RCS/serversyscall.c,v
  791.     retrieving revision 1.2
  792.     diff -c -r1.2 serversyscall.c
  793.     *** /tmp/,RCSt1003677   Wed Jan 28 15:15:02 1987
  794.     --- serversyscall.c     Wed Jan 28 15:14:48 1987
  795.     ***************
  796.     *** 163,169 ****
  797.         /*
  798.          * No return sent for close or fsync!
  799.          */
  800.     !       if (syscall == RSYS_close || syscall == RSYS_fsync)
  801.             proc->p_returnval = deallocate_fd(proc, msg->m_args[0]);
  802.         else
  803.         {
  804.     --- 166,172 ----
  805.         /*
  806.          * No return sent for close or fsync!
  807.          */
  808.     !       if (syscall == RSYS_close)
  809.             proc->p_returnval = deallocate_fd(proc, msg->m_args[0]);
  810.         else
  811.         {
  812.  
  813. * Vax C compiler bugs affecting Emacs.
  814.  
  815. You may get one of these problems compiling Emacs:
  816.  
  817.    foo.c line nnn: compiler error: no table entry for op STASG
  818.    foo.c: fatal error in /lib/ccom
  819.  
  820. These are due to bugs in the C compiler; the code is valid C.
  821. Unfortunately, the bugs are unpredictable: the same construct
  822. may compile properly or trigger one of these bugs, depending
  823. on what else is in the source file being compiled.  Even changes
  824. in header files that should not affect the file being compiled
  825. can affect whether the bug happens.  In addition, sometimes files
  826. that compile correctly on one machine get this bug on another machine.
  827.  
  828. As a result, it is hard for me to make sure this bug will not affect
  829. you.  I have attempted to find and alter these constructs, but more
  830. can always appear.  However, I can tell you how to deal with it if it
  831. should happen.  The bug comes from having an indexed reference to an
  832. array of Lisp_Objects, as an argument in a function call:
  833.   Lisp_Object *args;
  834.   ...
  835.    ... foo (5, args[i], ...)...
  836. putting the argument into a temporary variable first, as in
  837.   Lisp_Object *args;
  838.   Lisp_Object tem;
  839.   ...
  840.    tem = args[i];
  841.    ... foo (r, tem, ...)...
  842. causes the problem to go away.
  843. The `contents' field of a Lisp vector is an array of Lisp_Objects,
  844. so you may see the problem happening with indexed references to that.
  845.  
  846. * 68000 C compiler problems
  847.  
  848. Various 68000 compilers have different problems.
  849. These are some that have been observed.
  850.  
  851. ** Using value of assignment expression on union type loses.
  852. This means that  x = y = z;  or  foo (x = z);  does not work
  853. if x is of type Lisp_Object.
  854.  
  855. ** "cannot reclaim" error.
  856.  
  857. This means that an expression is too complicated.  You get the correct
  858. line number in the error message.  The code must be rewritten with
  859. simpler expressions.
  860.  
  861. ** XCONS, XSTRING, etc macros produce incorrect code.
  862.  
  863. If temacs fails to run at all, this may be the cause.
  864. Compile this test program and look at the assembler code:
  865.  
  866. struct foo { char x; unsigned int y : 24; };
  867.  
  868. lose (arg)
  869.      struct foo arg;
  870. {
  871.   test ((int *) arg.y);
  872. }
  873.  
  874. If the code is incorrect, your compiler has this problem.
  875. In the XCONS, etc., macros in lisp.h you must replace (a).u.val with
  876. ((a).u.val + coercedummy) where coercedummy is declared as int.
  877.  
  878. This problem will not happen if the m-...h file for your type
  879. of machine defines NO_UNION_TYPE.  That is the recommended setting now.
  880.  
  881. * C compilers lose on returning unions
  882.  
  883. I hear that some C compilers cannot handle returning a union type.
  884. Most of the functions in GNU Emacs return type Lisp_Object, which is
  885. defined as a union on some rare architectures.
  886.  
  887. This problem will not happen if the m-...h file for your type
  888. of machine defines NO_UNION_TYPE.  That is the recommended setting now.
  889.  
  890. * When Emacs tries to ring the bell, you get an error like
  891.  
  892.     audio: sst_open: SETQSIZE" Invalid argument
  893.     audio: sst_close: SETREG MMR2, Invalid argument
  894.  
  895. you have probably compiled using an ANSI C compiler, but with non-ANSI include
  896. files.  In particular, on Suns, the file /usr/include/sun/audioio.h uses the
  897. _IOW macro to define the constant AUDIOSETQSIZE.  _IOW in turn uses a K&R
  898. preprocessor feature that is now explicitly forbidden in ANSI preprocessors,
  899. namely substitution inside character constants.  All ANSI C compilers must 
  900. provide a workaround for this problem.  Lucid's C compiler is shipped with a 
  901. new set of system include files.  If you are using GCC, there is a script
  902. called fixincludes that creates new versions of some system include files that
  903. use this obsolete feature.
  904.  
  905. * The `Alt' key doesn't behave as `Meta' when running DECwindows.
  906.  
  907. The default DEC keyboard mapping has the Alt keys set up to generate the
  908. keysym `Multi_key', which has a meaning to xemacs which is distinct from that
  909. of the `Meta_L' and `Meta-R' keysyms.  A second problem is that certain keys
  910. have the Mod2 modifier attached to them for no adequately explored reason.
  911. The correct fix is to pass this file to xmodmap upon starting X:
  912.  
  913.     clear mod2
  914.     keysym Multi_key = Alt_L
  915.     add mod1 = Alt_L
  916.     add mod1 = Alt_R
  917.  
  918. * I get complaints about the mapping of my HP keyboard at startup, but I
  919.   haven't changed anything.
  920.  
  921. The default HP keymap is set up to have Mod1 assigned to two different keys:
  922. Meta_L and Mode_switch (even though there is not actually a Mode_switch key on
  923. the keyboard -- it uses an "imaginary" keycode.)  There actually is a reason
  924. for this, but it's not a good one.  The correct fix is to execute this command
  925. upon starting X:
  926.  
  927.     xmodmap -e 'remove mod1 = Mode_switch'
  928.  
  929. * I have focus problems when I use `M-o' to switch to another screen without
  930.   using the mouse.
  931.  
  932. The focus issues with a program like XEmacs, which has multiple homogeneous
  933. top-level windows, are very complicated, and as a result, most window managers
  934. don't implement them correctly.
  935.  
  936. The R4/R5 version of twm (and all of its descendants) had buggy focus
  937. handling; there is a patch in .../xemacs/etc/twm-patch which fixes this.
  938. Sufficiently recent versions of tvtwm do not need this patch, but most other
  939. versions of twm do.  If you need to apply this patch, please try to get it
  940. integrated by the maintainer of whichever version of twm you're using.
  941.  
  942. In addition, if you're using twm, make sure you have not specified
  943. "NoTitleFocus" in your .tvtwmrc file.  The very nature of this option makes
  944. twm do some illegal focus tricks, even with the patch.
  945.  
  946. It is known that olwm and olvwm are buggy, and in different ways.  If you're 
  947. using click-to-type mode, try using point-to-type, or vice versa.
  948.  
  949. In older versions of NCDwm, one could not even type at XEmacs windows.  This
  950. has been fixed in newer versions (2.4.3, and possibly earlier).
  951.  
  952. (Many people suggest that XEmacs should warp the mouse when focusing on
  953. another screen in point-to-type mode.  This is not ICCCM-compliant behavior.
  954. Implementing such policy is the responsibility of the window manager itself,
  955. it is not legal for a client to do this.)
  956.  
  957. * My buffers are full of \000 characters or otherwise corrupt.
  958.  
  959. Some compilers have trouble with gmalloc.c and ralloc.c; try recompiling
  960. without optimization.  If that doesn't work, try recompiling with
  961. SYSTEM_MALLOC defined, and/or with REL_ALLOC undefined.
  962.  
  963. * Some packages that worked before now cause the error
  964.   Wrong type argument: arrayp, #<face ... >
  965.  
  966. Code which uses the `face' accessor functions must be recompiled with xemacs
  967. 19.9 or later.  The functions whose callers must be recompiled are: face-font,
  968. face-foreground, face-background, face-background-pixmap, and face-underline-p.
  969. The .elc files generated by version 19.9 will work in 19.6 and 19.8, but older
  970. .elc files which contain calls to these functions will not work in 19.9.
  971.  
  972. * On Solaris 2.* I get undefined symbols from libcurses.a.
  973.  
  974. You probably have /usr/ucblib/ on your LD_LIBRARY_PATH.  Do the link with
  975. LD_LIBRARY_PATH unset.
  976.  
  977. * I don't have `xmkmf' and `imake' on my HP.
  978.  
  979. You can get these standard X tools by anonymous FTP to hpcvaaz.cv.hp.com.
  980. Essentially all X programs need these.
  981.  
  982. * When emacs starts up, I get lots of warnings about unknown keysyms.
  983.  
  984. If you are running the prebuilt binaries, the Motif library expects to find
  985. certain thing in the XKeysymDB file.  This file is normally in /usr/lib/X11/
  986. or in /usr/openwin/lib/.  If you keep yours in a different place, set the
  987. environment variable $XKEYSYMDB to point to it before starting emacs.  If 
  988. you still have the problem after doing that, perhaps your version of X is 
  989. too old.  There is a copy of the MIT X11R5 XKeysymDB file in the emacs `etc'
  990. directory.  Try using that one.
  991.  
  992. * My X resources used to work, and now some of them are being ignored.
  993.  
  994. Check the resources in .../etc/Emacs.ad (which is the same as the file
  995. sample.Xdefaults).  Perhaps some of the default resources built in to 
  996. emacs are now overriding your existing resources.  Copy and edit the
  997. resources in Emacs.ad as necessary.
  998.